package com.sneaker.shower.entity.domain.order;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.sneaker.shower.entity.domain.BaseUserDomain;
import lombok.*;

import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@TableName("pay_order")
public class PayOrderDO extends BaseUserDomain {

    /**
     * 微信支付金额
     */
    private BigDecimal actuallyPayFee;

    /**
     * 订单总金额
     */
    private BigDecimal orderPrice;

    /**
     * totalFee - actuallyPayFee = 会员卡余额消费
     */
    private BigDecimal totalFee;

    /**
     * 0 订单支付
     * 1 会员充值
     * 2 线下支付
     */
    private Byte type = 0;
    /**
     * 0 未支付
     * 1 支付成功
     * 2 已退款
     * 3 支付失败
     */
    private Byte status = 0;

    private String attach;

    private String errorMsg;

    private String orderNo;

    /**
     * 是否使用余额支付
     */
    private Boolean useCard;

    @Version
    private Integer version;

}
